<?php
/**
 * Die Singleton-Klasse von dem LD-CMS2
 * - Enthaelt alle anderen Klassen
 * 
 * 
 * @param none
 * @author Dennis Franke <dennis@franke-s.de>
 * @package LD-CMS2
 */
Class Singleton {
    static public $classes = array();

    
    /**
     * Kontruktor
     *
     */
    public function __construct() {
    	//$this->classes = array();
    }
    
    /**
     * Klasse Instanzieren
     *
     * @param string $className Name der Klasse.
     * @return instance
     */
    static public function getInstance($className) {
    	if (isset(self::$classes[$className])) {
   			return self::$classes[$className];
   		}
   		return null;
	}
	
	/**
	 * Add Class
	 *
	 * @param string $savename Instanzname
	 * @param string $classname Klassenname
	 */
	static public function addClass($savename,$classname) {
		self::$classes[$savename] = $classname;	
	}
}
?>